Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

gsap

Package Overview
Dependencies
Maintainers
1
Versions
82
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

gsap

GSAP is a JavaScript library for creating high-performance animations that work in **every** major browser (or beyond the browser). No other library delivers such advanced sequencing, reliability, API efficiency, and tight control while solving real-world

  • 1.20.6
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
452K
decreased by-12.64%
Maintainers
1
Weekly downloads
 
Created

What is gsap?

GSAP (GreenSock Animation Platform) is a powerful JavaScript library for creating high-performance animations that work in all major browsers. It is widely used for animating web elements, SVGs, and more, providing a rich set of features for developers to create complex animations with ease.

What are gsap's main functionalities?

Basic Tweening

This feature allows you to animate any property of an element over a specified duration. In this example, the element with the class 'element' will move 100 pixels to the right over 1 second.

gsap.to('.element', { duration: 1, x: 100 });

Timeline Animations

Timelines allow you to sequence multiple animations. In this example, 'element1' will move 100 pixels to the right, and then 'element2' will move 100 pixels down, each over 1 second.

const tl = gsap.timeline();
tl.to('.element1', { duration: 1, x: 100 })
  .to('.element2', { duration: 1, y: 100 });

Stagger Animations

Staggering allows you to animate multiple elements with a delay between each start. In this example, each element with the class 'elements' will move 100 pixels to the right, starting 0.2 seconds after the previous one.

gsap.to('.elements', { duration: 1, x: 100, stagger: 0.2 });

ScrollTrigger

ScrollTrigger allows you to create animations that are triggered by scrolling. In this example, the element with the class 'element' will move 100 pixels to the right when it enters the viewport.

gsap.registerPlugin(ScrollTrigger);
gsap.to('.element', { scrollTrigger: '.element', x: 100 });

Other packages similar to gsap

Keywords

FAQs

Package last updated on 23 May 2018

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc